package com.yjy.user.web;

import com.yjy.user.service.UserService;
import com.yjy.user.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

	@Autowired
	private UserService userService;

	@RequestMapping("/findUser")
	public User findUser(String username) {
		return userService.findOne(username);
	}

	@RequestMapping("/addUser")
	public User addUser(String username) {
		return userService.addUser(username);
	}

	@RequestMapping("/delUser")
	public User delUser(String username) {
		return userService.delUser(username);
	}
}
